package chamber.two.function;

import chamber.two.factory.ReindeerFactory;
import com.google.common.base.Function;
import com.google.common.util.concurrent.Service;
import com.google.inject.Inject;

/**
 * Created by Gerardo on 1/6/14.
 */
public class ToReindeerFunction implements Function<String, Service> {
    private final ReindeerFactory factory;

    @Inject
    public ToReindeerFunction(ReindeerFactory factory) {
        this.factory = factory;
    }

    @Override
    public Service apply(String input) {
        return factory.create(input);
    }
}
